/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoopp.qcoinpay;

import android.app.Activity;
import android.text.InputFilter;
import android.text.InputFilter.LengthFilter;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.ScrollView;
import android.widget.TextView;
import com.qihoopp.framework.LogUtil;
import java.util.Timer;
import java.util.TimerTask;

public class aw {
    private Activity a;
    private bi b;
    private n c;
    private RelativeLayout d;
    private EditText e;
    private EditText f;
    private EditText g;
    private EditText h;
    private TextView i;
    private TextView j;
    private int k = 0;
    private String l;
    private String m;
    private String n;
    private String o;
    private String p;
    private TextView q;
    private an r;
    private Timer s;
    private TimerTask t;
    private int u = 60;

    public aw(Activity paramActivity, String paramString1, String paramString2, String paramString3,
            String paramString4, n paramn) {
        this.a = paramActivity;
        this.c = paramn;
        this.b = bi.a(this.a);
        this.l = paramString1;
        this.m = paramString2;
        if (!(TextUtils.isEmpty(this.m))) {
            (paramActivity = new StringBuilder()).append(this.m.substring(0, 3));
            paramActivity.append("****");
            paramActivity.append(this.m.substring(7, 11));
            this.n = paramActivity.toString();
            this.r = new an(this);
        }
        if (!(TextUtils.isEmpty(paramString3)))
            this.o = paramString3;
        if (!(TextUtils.isEmpty(paramString4)))
            this.p = paramString4;
        paramString1 = cz.a((paramActivity = this).a, 3.0F);
        if (cy.a(paramActivity.a) > cy.b(paramActivity.a))
            paramString2 = cy.b(paramActivity.a) / 12;
        else
            paramString2 = cy.a(paramActivity.a) / 12;
        paramString3 = cz.a(paramActivity.a, 8.0F);
        paramString4 = cz.a(paramActivity.a, 12.0F);
        paramActivity.d = new RelativeLayout(paramActivity.a);
        (paramn = new LinearLayout(paramActivity.a)).setOrientation(1);
        LinearLayout.LayoutParams localLayoutParams;
        (localLayoutParams = new LinearLayout.LayoutParams(-1, cz.a(paramActivity.a, 2.0F))).topMargin = paramString3;
        Object localObject1 = new TextView(paramActivity.a);
        paramActivity.b.a((View) localObject1, "bg_titlebtn_nor.9.png", "bg_titlebtn_press.9.png",
                "bg_titlebtn_nor.9.png");
        ((TextView) localObject1).setTextColor(-1);
        ((TextView) localObject1).setTextSize(13.0F);
        ((TextView) localObject1).setGravity(17);
        ((TextView) localObject1).setText(a.a(b.p));
        Object localObject2 = new RelativeLayout.LayoutParams(cz.a(paramActivity.a, 55.5F),
                cz.a(paramActivity.a, 32.5F));
        ((TextView) localObject1).setLayoutParams((ViewGroup.LayoutParams) localObject2);
        (localObject1 = new af(paramActivity.a, (View) localObject1)).setId(cz.a());
        ((af) localObject1).a(new l(paramActivity));
        paramn.addView((View) localObject1, new LinearLayout.LayoutParams(-1, cz.a(paramActivity.a, 48.5F)));
        (localObject1 = new ImageView(paramActivity.a)).setScaleType(ImageView.ScaleType.FIT_XY);
        ((ImageView) localObject1).setImageDrawable(paramActivity.b.a("img_titleshade.png"));
        paramn.addView((View) localObject1, new LinearLayout.LayoutParams(-1, -2));
        (localObject1 = new LinearLayout(paramActivity.a)).setOrientation(1);
        ((LinearLayout) localObject1).setPadding(paramString2, paramString2, paramString2, paramString2);
        (paramString2 = new TextView(paramActivity.a)).setSingleLine();
        paramString2.setTextColor(-13421773);
        paramString2.setTextSize(16.0F);
        paramString2.setText(a.a(b.S) + paramActivity.l);
        ((LinearLayout) localObject1).addView(paramString2);
        ((LinearLayout) localObject1).addView(new ad(paramActivity.a), localLayoutParams);
        Object localObject3;
        if (TextUtils.isEmpty(paramActivity.m)) {
            (paramString2 = new TextView(paramActivity.a)).setTextColor(-13421773);
            paramString2.setTextSize(16.0F);
            paramString2.setText(a.a(b.ar));
            (localObject2 = new LinearLayout.LayoutParams(-1, -1)).topMargin = paramString3;
            ((LinearLayout) localObject1).addView(paramString2, (ViewGroup.LayoutParams) localObject2);
            localObject2 = new TextView(paramActivity.a);
            paramString2 = paramActivity.b.a("bg_spriner_nor.9.png");
            ((TextView) localObject2).setBackgroundDrawable(paramString2);
            ((TextView) localObject2).setPadding(paramString1, paramString1, paramString1, paramString1);
            ((TextView) localObject2).setTextColor(-13421773);
            ((TextView) localObject2).setTextSize(14.0F);
            ((TextView) localObject2).setGravity(16);
            ((TextView) localObject2).setText(paramActivity.p);
            (localObject3 = new LinearLayout.LayoutParams(-1, cz.a(paramActivity.a, 33.5F))).topMargin = paramString3;
            ((LinearLayout) localObject1).addView((View) localObject2, (ViewGroup.LayoutParams) localObject3);
            (localObject2 = new TextView(paramActivity.a)).setTextColor(-13421773);
            ((TextView) localObject2).setTextSize(16.0F);
            ((TextView) localObject2).setText(a.a(b.as));
            (paramString2 = new LinearLayout.LayoutParams(-1, -1)).topMargin = paramString3;
            ((LinearLayout) localObject1).addView((View) localObject2, paramString2);
            paramActivity.g = new EditText(paramActivity.a);
            paramActivity.g.setSingleLine();
            paramActivity.g.setTextColor(-13421773);
            paramActivity.g.setTextSize(14.0F);
            paramActivity.g.setPadding(paramString1, paramString1, paramString1, paramString1);
            paramActivity.g.setBackgroundDrawable(paramActivity.b.a("bg_edt.9.png"));
            (paramString2 = new LinearLayout.LayoutParams(-1, cz.a(paramActivity.a, 33.5F))).topMargin = paramString3;
            ((LinearLayout) localObject1).addView(paramActivity.g, paramString2);
            (paramString2 = new TextView(paramActivity.a)).setTextColor(-7829368);
            paramString2.setTextSize(12.0F);
            paramString2.setText(a.a(b.at));
            (localObject2 = new LinearLayout.LayoutParams(-1, -1)).topMargin = paramString4;
            ((LinearLayout) localObject1).addView(paramString2, (ViewGroup.LayoutParams) localObject2);
        }
        else {
            paramString2 = new TextView(paramActivity.a);
            (localObject2 = new StringBuilder()).append(a.a(b.br));
            ((StringBuilder) localObject2).append(paramActivity.n);
            paramString2.setTextColor(-13421773);
            paramString2.setTextSize(16.0F);
            paramString2.setText((CharSequence) localObject2);
            (localObject2 = new LinearLayout.LayoutParams(-1, -1)).topMargin = paramString3;
            ((LinearLayout) localObject1).addView(paramString2, (ViewGroup.LayoutParams) localObject2);
            paramString2 = new RelativeLayout(paramActivity.a);
            ((LinearLayout) localObject1).addView(paramString2, (ViewGroup.LayoutParams) localObject2);
            paramActivity.j = new TextView(paramActivity.a);
            paramActivity.b.a(paramActivity.j, "bg_coverbtn_nor.png", "bg_coverbtn_press.png", "bg_coverbtn_nor.png");
            paramActivity.j.setId(cz.a());
            paramActivity.j.setSingleLine();
            paramActivity.j.setTextColor(-13421773);
            paramActivity.j.setGravity(17);
            paramActivity.j.setTextSize(13.0F);
            paramActivity.j.setText(a.a(b.bs));
            paramActivity.j.setOnClickListener(new p(paramActivity));
            (localObject3 = new RelativeLayout.LayoutParams(cz.a(paramActivity.a, 105.5F), cz.a(paramActivity.a, 42.5F)))
                    .addRule(11, -1);
            ((RelativeLayout.LayoutParams) localObject3).addRule(15, -1);
            paramString2.addView(paramActivity.j, (ViewGroup.LayoutParams) localObject3);
            paramActivity.h = new EditText(paramActivity.a);
            paramActivity.h.setSingleLine();
            paramActivity.h.setTextColor(-13421773);
            paramActivity.h.setTextSize(14.0F);
            paramActivity.h.setFilters(new InputFilter[] { new InputFilter.LengthFilter(6) });
            paramActivity.h.setHint(a.a(b.bv));
            paramActivity.h.setPadding(paramString1, paramString1, paramString1, paramString1);
            paramActivity.h.setBackgroundDrawable(paramActivity.b.a("bg_edt.9.png"));
            paramActivity.h.setInputType(2);
            (localObject2 = new RelativeLayout.LayoutParams(-1, cz.a(paramActivity.a, 33.5F))).rightMargin = cz.a(
                    paramActivity.a, 2.5F);
            ((RelativeLayout.LayoutParams) localObject2).addRule(0, paramActivity.j.getId());
            ((RelativeLayout.LayoutParams) localObject2).addRule(15, -1);
            paramString2.addView(paramActivity.h, (ViewGroup.LayoutParams) localObject2);
            paramActivity.i = new TextView(paramActivity.a);
            paramActivity.i.setTextColor(-7829368);
            paramActivity.i.setTextSize(12.0F);
            paramActivity.i.setText(a.a(b.by));
            (paramString2 = new LinearLayout.LayoutParams(-1, -1)).topMargin = paramString3;
            ((LinearLayout) localObject1).addView(paramActivity.i, paramString2);
        }
        ((LinearLayout) localObject1).addView(new ad(paramActivity.a), localLayoutParams);
        paramActivity.e = new EditText(paramActivity.a);
        paramActivity.e.setSingleLine();
        paramActivity.e.setTextColor(-13421773);
        paramActivity.e.setTextSize(14.0F);
        paramActivity.e.setFilters(new InputFilter[] { new InputFilter.LengthFilter(18) });
        paramActivity.e.setHintTextColor(-7829368);
        paramActivity.e.setPadding(paramString1, paramString1, paramString1, paramString1);
        paramActivity.e.setBackgroundDrawable(paramActivity.b.a("bg_edt.9.png"));
        paramActivity.e.setHint(a.a(b.al));
        paramActivity.e.setInputType(129);
        (paramString2 = new LinearLayout.LayoutParams(-1, cz.a(paramActivity.a, 33.5F))).topMargin = paramString3;
        ((LinearLayout) localObject1).addView(paramActivity.e, paramString2);
        paramActivity.f = new EditText(paramActivity.a);
        paramActivity.f.setSingleLine();
        paramActivity.f.setTextColor(-13421773);
        paramActivity.f.setTextSize(14.0F);
        paramActivity.f.setFilters(new InputFilter[] { new InputFilter.LengthFilter(18) });
        paramActivity.f.setHintTextColor(-7829368);
        paramActivity.f.setPadding(paramString1, paramString1, paramString1, paramString1);
        paramActivity.f.setBackgroundDrawable(paramActivity.b.a("bg_edt.9.png"));
        paramActivity.f.setHint(a.a(b.am));
        paramActivity.f.setInputType(129);
        (localObject2 = new LinearLayout.LayoutParams(-1, cz.a(paramActivity.a, 33.5F))).topMargin = paramString3;
        ((LinearLayout) localObject1).addView(paramActivity.f, (ViewGroup.LayoutParams) localObject2);
        (localObject2 = new TextView(paramActivity.a)).setTextColor(-7829368);
        ((TextView) localObject2).setTextSize(12.0F);
        ((TextView) localObject2).setText(a.a(b.ao));
        (paramString2 = new LinearLayout.LayoutParams(-1, -1)).topMargin = paramString3;
        ((LinearLayout) localObject1).addView((View) localObject2, paramString2);
        paramActivity.q = new TextView(paramActivity.a);
        paramActivity.q.setGravity(17);
        paramActivity.q.setTextSize(16.0F);
        paramActivity.q.setTextColor(-1);
        paramActivity.b.a(paramActivity.q, "btn_nor.9.png", "btn_press.9.png", "btn_nor.9.png");
        paramActivity.q.setText(a.a(b.au));
        paramActivity.q.setOnClickListener(new ab(paramActivity));
        (localObject3 = new LinearLayout.LayoutParams(-1, cz.a(paramActivity.a, 40.5F))).topMargin = cz.a(
                paramActivity.a, 20.0F);
        ((LinearLayout) localObject1).addView(paramActivity.q, (ViewGroup.LayoutParams) localObject3);
        (localObject2 = new ScrollView(paramActivity.a)).addView((View) localObject1,
                new ViewGroup.LayoutParams(-1, -1));
        paramn.addView((View) localObject2, new LinearLayout.LayoutParams(-1, -1));
        paramActivity.d.addView(paramn, new RelativeLayout.LayoutParams(-1, -1));
    }

    public final void a(int paramInt) {
        this.k = paramInt;
    }

    public final void a() {
        this.q.setEnabled(true);
    }

    public final String b() {
        return this.e.getText().toString().trim();
    }

    public final void c() {
        this.c.b(aw.class.getName());
        if (TextUtils.isEmpty(this.m))
            return;
        h();
        this.j.setText(a.a(b.bs));
        i();
        this.k = 0;
        this.i.setText(a.a(b.by));
    }

    private void h() {
        if (this.s == null)
            return;
        this.s.cancel();
        this.s = null;
    }

    private void i() {
        this.j.setEnabled(true);
    }

    private void j() {
        this.j.setText(a.a(b.bt));
        i();
    }

    public final RelativeLayout d() {
        return this.d;
    }

    public final void e() {
        this.i.setText(a.a(b.bx) + this.n);
    }

    public final void f() {
        h();
        j();
        this.i.setText(a.a(b.bz));
    }

    public final void a(String paramString) {
        this.h.setText(paramString);
        this.i.setText(a.a(b.bx) + this.n);
        h();
        j();
    }

    public final void g() {
        aw localaw1;
        aw localaw2 = localaw1 = this;
        try {
            if (localaw2.s != null) {
                localaw2.s.cancel();
                localaw2.s = null;
                LogUtil.v("PassWordResetPayPage", "initTimerTask, mTimer != null, cancel and renew one.");
            }
            else {
                LogUtil.v("PassWordResetPayPage", "initTimerTask, mTimer == null, new one.");
            }
            localaw2.s = new Timer();
            localaw2.u = 60;
        } catch (Exception localException) {
            localException.printStackTrace();
        }
        localaw2.t = new am(localaw2);
        localaw1.s.schedule(localaw1.t, 1000L, 1000L);
        localaw1.j.setText("60" + a.a(b.bu));
    }
}